namespace BepuPhysics.Collidables
{
    /// <summary>
    /// 可碰撞器描述
    /// </summary>
    public struct CollidableDescription
    {
        public TypedIndex Shape;
        public float SpeculativeMargin;
        public ContinuousDetectionSettings Continuity;

        /// <summary>
        /// 构造新的可碰撞描述。
        /// </summary>
        /// <param name="Shape">可冲突对象使用的形状。</param>
        /// <param name="speculativeMargin">允许推测性联系人生成的边距半径。</param>
        /// <param name="Continuity">可碰撞对象的连续冲突检测设置。</param>
        public CollidableDescription(TypedIndex shape, float speculativeMargin, in ContinuousDetectionSettings continuity)
        {
            Shape = shape;
            SpeculativeMargin = speculativeMargin;
            Continuity = continuity;
        }

        /// <summary>
        /// 构造具有默认离散连续性的新的可碰撞描述。
        /// </summary>
        /// <param name="Shape">可冲突对象使用的形状。</param>
        /// <param name="speculativeMargin">允许推测性联系人生成的边距半径。</param>
        public CollidableDescription(TypedIndex shape, float speculativeMargin) : this(shape, speculativeMargin, default)
        {
        }
    }
}
